import service from "@/utils/request";

export function getUserListService(params) {
  return service({
    url: "/user/list",
    method: "get",
    params,
  });
}

export function getUserRoleListService(params) {
    return service({
        url: "/user/role",
        method: "get",
        params,
    });
}

export function getAvailableRolesService(params) {
    return service({
        url: "/user/availableRoles",
        method: "get",
        params,
    });
}

export function addUserRoleService(data) {
    return service({
        url: "/user/role/add",
        method: "post",
        data,
    });
}

export function removeUserRoleService(data) {
    return service({
        url: "/user/role/remove",
        method: "delete",
        data,
    });
}

export function updateStatusService(params = {}) {
  return service({
    url: "/user/updateStatus",
    method: "put",
    data: params,
  });
}